/*
 * @Author: your name
 * @Date: 2020-10-28 23:36:16
 * @LastEditTime: 2020-10-29 16:16:23
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \就业班练习d:\桌面\ma-pc\src\api\comment.js
 */
import axios from '@/utils/request'

/**
 * @description: 获取评论管理列表
 * @param {Object} params
 * @return {Promise}
 */
export const hGetComment = (page) => {
  return axios({
    method: 'GET',
    url: '/mp/v1_0/articles',
    params: {
      response_type: 'comment',
      page
    }
  })
}

/**
 * @description: 修改评论状态
 * @param {*} page
 * @return {*}
 */

export const putComment = (id, allow) => {
  return axios({
    method: 'PUT',
    url: '/mp/v1_0/comments/status?article_id=' + id,
    data: { allow_comment: allow }
  })
}
